<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/userTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content1">
        <h:form id="form">  

            <p:editor id="editor" value="" width="600"/>  

            <h:panelGrid columns="2" style="margin-top:10px">  
                <p:commandButton id="submitButton" value="Submit" update="display" oncomplete="PF('dlg').show()"  
                                 icon="ui-icon-disk" />  
                <p:commandButton id="clearButton" type="button" value="Clear" onclick="PF('editor').clear()"  
                                 icon="ui-icon-close" />  
            </h:panelGrid>  

            <p:dialog header="Content" widgetVar="dlg" showEffect="fade" hideEffect="fade" modal="true">  
                <h:outputText id="display" value="#{editorBean.value}" escape="false" />  
            </p:dialog>  

        </h:form> 
    </ui:define>

</ui:composition>
